<%@ page import="bean.person" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>个人信息</title>

    <link href="../signup-css-fonts-js/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="../css/simple-sidebar.css" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="../fonts/icomoon/style.css">

    <link rel="stylesheet" href="../css/bootstrap.min.css">

    <link rel="stylesheet" href="../css/bootstrap-datepicker.css">

    <link rel="stylesheet" href="../css/style.css">

    <link rel="stylesheet" type="text/css" href="../signup-css-fonts-js/css/util.css">
    <link rel="stylesheet" type="text/css" href="../signup-css-fonts-js/css/main.css">
    <style type="text/css">
        .unseen{
            display: none;
        }
    </style>
</head>

<body>
<div class="site-wrap">

    <div class="site-mobile-menu">
        <div class="site-mobile-menu-header">
            <div class="site-mobile-menu-close mt-3">
                <span class="icon-close2 js-menu-toggle"></span>
            </div>
        </div>
        <div class="site-mobile-menu-body"></div>
    </div>

    <header class="site-navbar py-1" role="banner">

        <div class="container">
            <div class="row align-items-center">

                <div class="col-6 col-xl-2">
                    <h1 class="mb-0"><a href="index.html" class="text-black h2 mb-0">爱旅行</a></h1>
                </div>
                <div class="col-10 col-md-8 d-none d-xl-block">
                    <nav class="site-navigation position-relative text-right text-lg-center" role="navigation">

                        <ul class="site-menu js-clone-nav mx-auto d-none d-lg-block">
                            <li>
                                <h3>
                                    <a href="http://localhost:8080/index.jsp">首页</a>
                                </h3>
                            </li>
                            <li>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </li>

                            <li>
                                <h3>
                                    <a href="http://localhost:8080/manage">管理</a>
                                </h3>
                            </li>
                        </ul>
                    </nav>
                </div>

                <%
                    person p = (person) request.getSession().getAttribute("person");
                    if(p == null){
                %>
                <div class="col-6 col-xl-2 text-right">
                    <div class="d-none d-xl-inline-block">
                        <ul class="site-menu js-clone-nav ml-auto list-unstyled d-flex text-right mb-0" data-class="social">
                            <li>
                                <a href="http://localhost:8080/login.jsp?jmpFlag=0" class="pl-0 pr-3 text-black"><span class="icon-tripadvisor"></span>登陆</a>
                            </li>
                            <li>
                                <a href="http://localhost:8080/tourist/register.jsp" class="pl-3 pr-3 text-black"><span class="icon-twitter"></span>注册</a>
                            </li>
                        </ul>
                    </div>

                    <div class="d-inline-block d-xl-none ml-md-0 mr-auto py-3" style="position: relative; top: 3px;"><a href="#" class="site-menu-toggle js-menu-toggle text-black"><span class="icon-menu h3"></span></a></div>

                </div>
                <%
                }else{
                %>
                <div class="col-6 col-xl-2 text-right">
                    <div class="d-none d-xl-inline-block">
                        <ul class="site-menu js-clone-nav ml-auto list-unstyled d-flex text-right mb-0" data-class="social">
                            <li style="width: 200px;font-size: 15px;">
                                <a href="http://localhost:8080/index.jsp" class="text-black">欢迎您，<%=p.getUserName()%></a>
                            </li>
                            <li style="width: 50px;font-size: 14px;">
                                <a href="http://localhost:8080/logout" class="pl-3 text-black">退出</a>
                            </li>
                        </ul>
                    </div>

                    <div class="d-inline-block d-xl-none ml-md-0 mr-auto py-3" style="position: relative; top: 3px;"><a href="#" class="site-menu-toggle js-menu-toggle text-black"><span class="icon-menu h3"></span></a></div>
                </div>
                <%
                    }
                %>

            </div>
        </div>

    </header>
    <div class="site-blocks-cover inner-page-cover" style="background-image: url(../images/hero_bg_2.jpg);" data-aos="fade" data-stellar-background-ratio="0.5">
        <div class="container">
            <div class="row align-items-center justify-content-center text-center">

                <div class="col-md-8" data-aos="fade-up" data-aos-delay="400">
                    <h3 class="text-white font-weight-light">来选择你心仪的旅行地吧</h3>
                    <div><a href="index.jsp">首页</a> <span class="mx-2 text-white">&bullet;</span> <span class="text-white">管理</span></div>

                </div>
            </div>
        </div>
    </div>


    <div class="d-flex" id="wrapper">

        <!-- Sidebar -->
        <div class="bg-light border-right" id="sidebar-wrapper">
            <div class="sidebar-heading sidebar_item">个人中心</div>
            <div class="list-group list-group-flush">
                <<a href="http://localhost:8080/tourist/info.jsp" class="list-group-item list-group-item-action bg-light" style="height: 60px;text-align: center;display: flex;justify-content: center;align-items: center;">个人信息</a>
            </div>
        </div>
        <div id="page-content-wrapper">

            <nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
                <h3>个人信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h3>



                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav ml-auto mt-2 mt-lg-0">
                        <button class="btn btn-primary changeInfo" id="menu-toggle">点击修改个人信息</button>
                    </ul>
                </div>
            </nav>

            <div class="container-fluid">

                <!--
                <div id="data-container"></div>
                <div id="pagination-container"></div>
                -->
                <div class="table100 ver5 m-b-110">

                    <form class='info-form' method="post" >
                        <table id="info-table" data-vertable="ver5">
                            <tbody  id="data-container">
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">用户名</td>
                                <td class="column100 column2" data-column="column2"><%=p.getUserName()%></td>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">密码</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getPassword()%></td>
                                <span class="unseen">password</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">姓名</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getName()%></td>
                                <span class="unseen">name</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">身份证</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getId()%></td>
                                <span class="unseen">id</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">手机号</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getPhone()%></td>
                                <span class="unseen">phone</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">性别</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getSex()%></td>
                                <span class="unseen">sex</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">民族</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getNation()%></td>
                                <span class="unseen">nation</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">生日</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getBirth()%></td>
                                <span class="unseen">birth</span>
                            </tr>
                            <tr class="row100">
                                <td class="column100 column2" data-column="column2">地区</td>
                                <td class="column100 column2 input" data-column="column2"><%=p.getPlace()%></td>
                                <span class="unseen">place</span>
                            </tr>
                            </tbody>
                        </table>
                        <div class="form-button" style="display: none;font-size: 20px;margin-left: 23px;">
                            <button type="submit" style="color: #ef6c57;text-decoration: none;background-color: transparent;">保存</button>
                            <button type="reset" class="cancel" style="color: #ef6c57;text-decoration: none;background-color: transparent;">取消</button>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
    <footer class="site-footer">
        <div class="container">
            <div class="row">
                <div class="col-lg-4">
                    <div class="mb-5">
                        <h3 class="footer-heading mb-4">关于我们</h3>
                        <p>我们是一个致力于给用户提供旅游报名服务的团队</p>
                    </div>



                </div>
                <div class="col-lg-4 mb-5 mb-lg-0">
                    <div class="row mb-5">
                        <div class="col-md-12">
                            <h3 class="footer-heading mb-4">友情链接</h3>
                        </div>
                        <div class="col-md-6 col-lg-6">
                            <ul class="list-unstyled">
                                <li><a href="http://www.lvy.cn">驴友网</a></li>
                                <li><a href="https://www.qyer.com">穷游网</a></li>
                                <li><a href="https://www.ly.com/">同程旅游</a></li>
                                <li><a href="http://www.tuniu.com">途牛旅游网</a></li>
                            </ul>
                        </div>
                        <div class="col-md-6 col-lg-6">
                            <ul class="list-unstyled">
                                <li><a href="https://www.ctrip.com">携程</a></li>
                                <li><a href="https://www.qunar.com">去哪儿</a></li>
                                <li><a href="http://www.mangocity.com">芒果网</a></li>
                                <li><a href="https://www.uzai.com">悠哉旅游网</a></li>
                            </ul>
                        </div>
                    </div>



                </div>

                <div class="col-lg-4 mb-5 mb-lg-0">


                    <div class="mb-5">
                        <h3 class="footer-heading mb-2">联系我们</h3>
                        <p>QQ：871517664</p>
                        <p>QQ：963604618</p>
                    </div>

                </div>

            </div>
            <div class="row pt-5 mt-5 text-center">
                <div class="col-md-12">
                    <div class="mb-5">
                        <a href="#" class="pl-0 pr-3"><span class="icon-facebook"></span></a>
                        <a href="#" class="pl-3 pr-3"><span class="icon-twitter"></span></a>
                        <a href="#" class="pl-3 pr-3"><span class="icon-instagram"></span></a>
                        <a href="#" class="pl-3 pr-3"><span class="icon-linkedin"></span></a>
                    </div>
                </div>

            </div>
        </div>
    </footer>
</div>
<script src="../signup-css-fonts-js/vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="../signup-css-fonts-js/vendor/bootstrap/js/popper.js"></script>
<script src="../signup-css-fonts-js/vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
<script src="../signup-css-fonts-js/vendor/select2/select2.min.js"></script>
<!--===============================================================================================-->
<script src="../signup-css-fonts-js/js/main.js"></script>
<script type="text/javascript" src="../js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="../js/pagination.js"></script>
<script type="text/javascript" src="../js/cycle.js"></script>
<script type="text/javascript" src="../js/json2.js"></script>

<!-- Menu Toggle Script -->
<script>
    $("#menu-toggle").click(function(e) {
        e.preventDefault();
        $("#wrapper").toggleClass("toggled");
    });
</script>



<script type="text/javascript">

    $(document).on("click", ".changeInfo", function(){
        var thisform = $('form');
        console.log(thisform);
        thisform.attr("action","http://localhost:8080/TouristManage?type=info&handle=update&userName=" + '<%=p.getUserName()%>');
        //隐藏修改按钮
        $(".changeInfo").hide();
        console.log($(".changeInfo"));
        //显示 保存、取消 按钮
        $(".form-button").show();
        var input = $(".input");
        var len = input.length;
        for(var i=0;i<len;i++){
            var text = input.eq(i).text();
            var name = $(".unseen").eq(i).text();
            var str = '<input type="text" name="'+name+'" value="'+text+'"><span class="unseen">'+name+'</span>';
            input.eq(i).html(str);
        }
    });


    $(document).on("click", ".cancel", function (){
        window.location.reload();
    });

</script>
<script src="../js/jquery-3.3.1.min.js"></script>
<script src="../js/jquery-migrate-3.0.1.min.js"></script>
<script src="../js/jquery-ui.js"></script>
<script src="../js/popper.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/owl.carousel.min.js"></script>
<script src="../js/jquery.stellar.min.js"></script>
<script src="../js/jquery.countdown.min.js"></script>
<script src="../js/jquery.magnific-popup.min.js"></script>
<script src="../js/bootstrap-datepicker.min.js"></script>
<script src="../js/aos.js"></script>
<script src="../js/main.js"></script>

</body>

</html>
